<!DOCTYPE html>
<html>
<head>
    <title>酒店管理后台</title>
    <link rel="shortcut icon" href="/static/image/bitbug_favicon.ico">
    <meta charset="UTF-8">
    <meta name="renderer" content="webkit"/> 
    <meta name="force-rendering" content="webkit"/> 
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"/> 
    <!-- <link rel="stylesheet" href="/static/css/hw-admin.css"> -->
    <!-- <link rel="shortcut icon" href="//static.moocollege.com/assets/3.0.0/favicon.ico"> -->
    <!-- <link rel="shortcut icon" href="//gtms04.alicdn.com/tps/i4/TB1_oz6GVXXXXaFXpXXJDFnIXXX-64-64.ico" type="image/x-icon"> -->
    <!-- <link rel="stylesheet" href="/static/css/index.css"> -->
    <!-- <link rel="stylesheet" href="/static/css/i_base.css"> -->
    <link rel="stylesheet" type="text/css" href="/static/css/hw-admin.css">
    <link rel="stylesheet" href="/static/css/i_base.css">
    <!--[if lt IE 9]>
    　 <script src="/static/lib/html5shiv.min.js" type="text/javascript"></script>
       <script src="/static/lib/selectivizr.min.js" type="text/javascript"></script>
    <![endif]-->  
    <style>
        .admin-header ul li.logo {
            font-size: 20px;
            float: left;
            height: 50px;
            padding: 0 15px 0 12px;
            box-sizing: border-box;
            background-color: #4e4e4e;
            background: rgba(255, 255, 255, 0.1);
            width: 200px;
        }
         .zero {
            width: 16px;
            height: 16px;
            border-radius: 50%;
            background: red;
            color: #fff;
            position: absolute;
            right: 50px;;
            top: 50%;
            line-height: 16px;
            text-align: center;
            margin-top: -6px;
            font-size: 12px;
         }  
    </style>
</head>
<body>
    <!-- 头部 -->
    <div class="admin-header">
        <ul>
            <li class="logo" style="padding-left: 16px;display: flex;align-items: center;    justify-content: center;"><img style='width: 60px;height: auto;' src="/static/image/zj-sc.png" alt=""></li>
            <li style="padding-left: 8px;position: absolute;left: 213px;top: 0;">酒店管理后台</li>

            <!-- 管理员 -->
            <li class="quit_login" id="logout">
                <div class="box">
                    <i class="iconfont" style="font-size:20px;">&#xe871;</i>
                    <span><?=$_SESSION['hotelAdmin_info']['account'] ?></span>
                    <div class="down_sanjiao"></div>
                </div>
            </li>

            <!--admin_quit 悬停框-->
            <div class="admin_quit">
                <!-- <div class="up_sanjiao"></div> -->
                <div class="info">
                    <div class="user_info">
                        <ul> 
                            <li>
                            <p>
                                <!-- <?=$_SESSION['admin_info']['usergroup']==1?'街道管理员':'网格长'?> -->
                            </p>
                            <!-- <span><php echo isset($_SESSION["admin_info"]["account"])?$_SESSION["admin_info"]["account"]:'';?></span> -->
                            </li>
                        </ul>
                    </div>
                    <div class="pub_style">
                        <a target="iframe" href="/HotelAdmin/Index/editpass">
                            <ul>
                                <li><i class="iconfont">&#xe872;</i></li>
                                <li>修改密码</li>
                            </ul>
                        </a>
                    </div>
                    <div class="logout pub_style">
                        <a target="_self" href="/HotelAdmin/Login/logOut">
                            <ul>
                                <li><i class="iconfont">&#xe65a;</i></li>
                                <li>退出登录</li>
                            </ul>
                        </a>
                    </div>
                </div>
            </div> 
        </ul>
    </div>

    <!--侧边栏目录-->
    <div class="admin-aside">
        <div class="first_sidebar">
            <ul>
                <!-- 合起展开 -->
                <li class="toggle-menu">
                    <i class="iconfont">&#xe876;</i>
                    <i class="shrink iconfont">&#xe877;</i>
                </li> 

             

                <!-- <li>
                    <div class="first-menu" title="首页">
                        <i class="iconfont blue-icon">&#xe65b;</i>
                        <span>首页</span>
                        <i class="slide-icon iconfont">&#xe879;</i>
                        <i class="slide-icon iconfont slidedown">&#xe878;</i>
                    </div>
                </li> -->
            
                <!-- 发票权限判断 -->
                <?php if ($invoice_auth == 1): ?>
                    <li style="postion: relative;">
                        <a target="iframe" href="<?=base_url().'HotelAdmin/Invoice/invoiceList'?>">
                            <div class="first-menu" title="发票管理">
                                <i class="iconfont blue-icon">&#xe6ae;</i>
                                <span>发票管理</span>
                                <?php if(isset($count) && $count!=0){?>
                                <div class="zero"><?=$count?></div>
                                <?php }?>
                                <!-- <i class="slide-icon iconfont">&#xe879;</i>
                                <i class="slide-icon iconfont slidedown">&#xe878;</i> -->
                            </div>  
                        </a>                
                    </li>
                <?php endif ?>

                <!-- 主页权限判断 -->
                <?php if ($index_auth == 1): ?>
                    <li>
                        <a target="iframe" href="/HotelAdmin/Hotel/hotelEdit">
                            <div class="first-menu" title="酒店主页">
                                <i class="iconfont blue-icon">&#xe6ae;</i>
                                <span>酒店主页</span>
                                <!-- <i class="slide-icon iconfont">&#xe879;</i>
                                <i class="slide-icon iconfont slidedown">&#xe878;</i> -->
                            </div>  
                        </a>                
                    </li>
                    <li>
                        <a target="iframe" href="/HotelAdmin/Service/serviceList">
                            <div class="first-menu" title="酒店主页">
                                <i class="iconfont blue-icon">&#xe6ae;</i>
                                <span>酒店服务</span>
                                <!-- <i class="slide-icon iconfont">&#xe879;</i>
                                <i class="slide-icon iconfont slidedown">&#xe878;</i> -->
                            </div>  
                        </a>                
                    </li>
                <?php endif ?>
            </ul>
        </div>
        <!-- 杭为科技 -->
        <div class="company_logo"><a href="http://www.ihangwei.com" target="_blank">杭为科技 | 技术支持</a></div>
    </div>

    <!--主体信息-->
    <div class="admin-section">
        <iframe src="<?=$invoice_auth == 1 ? '/HotelAdmin/Invoice/invoiceList' : '' ?>" id="iframe" name="iframe" width="100%" height="100%" frameborder="0"></iframe>
    </div>

    <script src="/static/lib/jquery-1.12.4.min.js"></script>
    <script src="/static/js/adminIndex.js"></script>
    <script>
        $.post('/HotelAdmin/Invoice/getRedNum',function(info){
                info = JSON.parse(info);
                if(info.code==0){
                    $('.zero').hide();
                }else {
                    $('.zero').text(info.count);
                }
            })
        setInterval(function(){
            $.post('/HotelAdmin/Invoice/getRedNum',function(info){
                info = JSON.parse(info);
                if(info.code==0){
                    $('.zero').hide();
                }else {
                    $('.zero').text(info.count);
                }
            })
        },5000)
    </script>
</body>
</html>